package com.example.common.bean;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ApiCode {
    // 公共返回码
    SUCCESS(0, "请求成功"),
    SYSTEM_BUSY(-1, "系统繁忙，请稍后重试..."),
    SYSTEM_FAIL(-2, "请求失败，请稍后重试..."),
    TOKEN_ERROR(400001, "登录信息已过期，请重新登录..."),
    PARAMETER_ERROR(400002, "参数错误：%s"),
    ERROR(400003, "未知异常"),
    ERROR_400004(400004, "参数解析失败"),
    ERROR_400005(400005, "不支持的请求方式"),
    ERROR_400006(400006, "不支持的媒体类型"),
    ERROR_ILLEGAL_REQUEST(400007, "非法请求"),
    ERROR_BUSINESS(400008, "业务异常: %s"),
    ERROR_400009(400009, "请求超时"),
    ERROR_400010(400010, "验证码不正确"),
    PERMISSION_DENIED(400011, "权限不足"),

    WX_ERROR(500001, "获取微信授权信息失败"),
    WX_ERROR_MSG(500002, "获取微信授权信息失败:%s"),

    LOGIN_NOT_PHONE(500003, "未查询到手机信息，请绑定手机号"),
    LOGIN_PHONE_NOT_BIND(500004, "未有用户绑定该手机号，请绑定"),

    USER_FREEZE(500005, "用户名%s已被管理员冻结"),
    USER_OVERDUE(500006, "用户名%s已过期"),
    USER_INTERFACE(500007, "该账号%s只能进行使用接口来获取数据，不能使用该账号直接登录系统"),
    USER_NOT_PROJECT(500008, "该用户没有被分配项目,请核实后重试"),
    USER_NOT_ROLE(500009, "该用户没有被分配项目角色,请核实后重新登录"),
    USER_AUTHORIZATION_OVERDUE(500010, "该授权已过期"),

    LOGIN_BIND_UPDATE(500011, "绑定用户已经变更，请确认"),
    PROJECT_NOT_PERMISSION(500012, "用户在该项目下没有权限"),

    PLATFORM_NOT_LOGO(500101, "未找到logo信息，请确认已设置"),

    CORPORATION_NOT_FOUND(500201, "未找到公司信息，请确认"),

    VODE_ERROR(500301,"验证码错误"),

    INVENTORY_EOOR(500401,"库存不足"),

    LOGIN_NOTFOUND_EROOR(500501,"登录失败，未获取到用户信息"),

    ORDER_REAPTE_ERROR(500502,"该用户已经秒杀过"),
    ;

    private int code;
    private String message;
}
